package edu.guet.facade;

public class Facade {

    SubSystemOne subSystemOne;

    SubSystemTwo subSystemTwo;

    SubSystemThere subSystemThere;

    SubSystemFour subSystemFour;

    public Facade() {

        subSystemOne = new SubSystemOne();
        subSystemTwo = new SubSystemTwo();
        subSystemThere = new SubSystemThere();
        subSystemFour = new SubSystemFour();
    }

    public void methodA(){
        System.out.println("方法组A--------");
        subSystemOne.methodOne();
        subSystemTwo.methodTwo();
        subSystemThere.methodThere();
    }

    public void methodB(){
        System.out.println("方法组B------------");
        subSystemFour.methodFour();
    }

    class SubSystemOne{
        public void methodOne(){
            System.out.println("子系统方法一");
        }
    }

    class SubSystemTwo{
        public void methodTwo(){
            System.out.println("子系统方法二");
        }
    }

    class SubSystemThere{
        public void methodThere(){
            System.out.println("子系统方法三");
        }
    }

    class SubSystemFour{
        public void methodFour(){
            System.out.println("子系统方法四");
        }
    }
}
